package com.tensquare.article.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author Macross
 * @Type Article.java
 * @Desc 文章信息实体类
 * @date 2019/12/17 19:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "tb_article")
@ApiModel(description = "文章信息实体类")
public class Article implements Serializable {

    @Id
    @ApiModelProperty(value = "ID")
    private String id;

    @Column(name = "columnid")
    @ApiModelProperty(value = "专栏ID")
    private String columnId;

    @Column(name = "userid")
    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "文章正文")
    private String content;

    @ApiModelProperty(value = "文章封面")
    private String image;

    @Column(name = "createtime")
    @ApiModelProperty(value = "发表日期")
    private Date createTime;

    @Column(name = "updatetime")
    @ApiModelProperty(value = "修改日期")
    private Date updateTime;

    @Column(name = "ispublic")
    @ApiModelProperty(value = "是否公开")
    private String isPublic;

    @Column(name = "isstop")
    @ApiModelProperty(value = "是否置顶")
    private String isStop;

    @ApiModelProperty(value = "浏览量")
    private Integer visits;

    @ApiModelProperty(value = "点赞数")
    private Integer thumbup;

    @ApiModelProperty(value = "评论数")
    private Integer comment;

    @ApiModelProperty(value = "审核状态")
    private String state;

    @Column(name = "channelid")
    @ApiModelProperty(value = "所属频道")
    private String channelId;

    @ApiModelProperty(value = "URL")
    private String url;

    @ApiModelProperty(value = "类型")
    private String type;
}
